﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using BDGetQuote.Utilities;

namespace BDGetQuote.Web.App_Start
{
    public class Helper
    {
        public static void AuthenSystem()
        {
            if (HttpContext.Current.Session[Constants.SessionUser]==null)
            {
                HttpContext.Current.Response.Redirect("~/Login");
            }
        }
        public static string GetDomainUrl()
        {
            var url = HttpContext.Current.Request.Url.Scheme + System.Uri.SchemeDelimiter + HttpContext.Current.Request.Url.Host + (HttpContext.Current.Request.Url.IsDefaultPort ? "" : ":" + HttpContext.Current.Request.Url.Port);
            return url;
        }
    }
}